In computer programming, deep magic refers to techniques that are not widely known, and may be deliberately kept secret. The number of such techniques has arguably decreased in recent years, especially in the field of cryptography, many aspects of which are now open to public scrutiny. The Jargon File makes a distinction between deep magic, which refers to (code based on) esoteric theoretical knowledge; black magic, which refers to (code based on) techniques that appear to work but which lack a theoretical explanation; and heavy wizardry, which refers to (code based on) obscure or undocumented intricacies of particular hardware or software. All three terms can appear in source code comments of the form:
In fiction, the term comes from The Lion, the Witch and the Wardrobe, an early book from C. S. Lewis's The Chronicles of Narnia, which describes ancient laws and codes as "deep magic from the dawn of time."
Many programmers have been influenced by the writings of Arthur C. Clarke, who said, "Any sufficiently advanced technology is indistinguishable from magic."
Such technology may be termed "Advanced Magic". See: Clarke's three laws.